home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / cfuncproto.h,v < prev    next >
Encoding:
Text File  |  1991-10-07  |  3.6 KB  |  202 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.5.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     91.02.12.14.48.28;  author jhh;  state Exp;
  11. branches 1.5.1.1;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     91.02.12.14.47.11;  author jhh;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     90.11.06.17.21.16;  author rab;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     90.09.11.11.00.53;  author mendel;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     90.08.20.16.52.45;  author mendel;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34. 1.5.1.1
  35. date     91.10.06.23.58.18;  author kupfer;  state Exp;
  36. branches ;
  37. next     ;
  38.  
  39.  
  40. desc
  41. @Macros for standard C function prototypes in Sprite.
  42. @
  43.  
  44.  
  45. 1.5
  46. log
  47. @guess I was a little hasty in installing the last change
  48. @
  49. text
  50. @/*
  51.  * cfuncproto.h --
  52.  *
  53.  *    Declarations of a macro supporting Ansi-C function prototypes in
  54.  *    Sprite. This macro allow function prototypes to be defined 
  55.  *    such that the code works on both standard and K&R C.
  56.  *
  57.  * Copyright 1990 Regents of the University of California
  58.  * Permission to use, copy, modify, and distribute this
  59.  * software and its documentation for any purpose and without
  60.  * fee is hereby granted, provided that the above copyright
  61.  * notice appear in all copies.  The University of California
  62.  * makes no representations about the suitability of this
  63.  * software for any purpose.  It is provided "as is" without
  64.  * express or implied warranty.
  65.  *
  66.  * $Header: /sprite/src/lib/include/RCS/cfuncproto.h,v 1.4 91/02/12 14:47:11 jhh Exp Locker: jhh $ SPRITE (Berkeley)
  67.  */
  68.  
  69. #ifndef _CFUNCPROTO
  70. #define _CFUNCPROTO
  71.  
  72. /*
  73.  * Definition of the _ARGS_ macro.  The _ARGS_ macro such be used to 
  74.  * enclose the argument list of a function prototype.  For example, the
  75.  * function:
  76.  * extern int main(argc, argv)
  77.  *    int args;
  78.  *     char **argv;
  79.  *
  80.  * Would have a prototype of:
  81.  *
  82.  * extern int main _ARGS_((int argc, char **argv))
  83.  *
  84.  * Currently the macro uses the arguments only when compiling the
  85.  * KERNEL with a standard C compiler.
  86.  */
  87.  
  88. #ifndef _ASM
  89.  
  90. #if defined(KERNEL) && defined(__STDC__)
  91. #define _HAS_PROTOTYPES
  92. #define _HAS_VOIDPTR
  93. #endif
  94.  
  95. #if defined(__cplusplus)
  96. #define _EXTERN         extern "C"
  97. #define _NULLARGS    (void) 
  98. #define _HAS_PROTOTYPES
  99. #define _HAS_VOIDPTR
  100. #define _HAS_CONST
  101. #else 
  102. #define _EXTERN         extern
  103. #define _NULLARGS    () 
  104. #endif
  105.  
  106. #if defined(_HAS_PROTOTYPES) && !defined(lint)
  107. #define    _ARGS_(x)    x
  108. #else
  109. #define    _ARGS_(x)    ()
  110. #endif
  111.  
  112. #ifdef _HAS_CONST
  113. #define _CONST          const
  114. #else
  115. #define _CONST
  116. #endif
  117.  
  118. #ifdef _HAS_VOIDPTR
  119. typedef void *_VoidPtr;
  120. #else
  121. typedef char *_VoidPtr;
  122. #endif
  123.  
  124. #endif /* _ASM */
  125. #endif /* _CFUNCPROTO */
  126.  
  127. @
  128.  
  129.  
  130. 1.5.1.1
  131. log
  132. @Initial branch for Sprite server.
  133. @
  134. text
  135. @d17 1
  136. a17 1
  137.  * $Header: /sprite/src/lib/include/RCS/cfuncproto.h,v 1.5 91/02/12 14:48:28 jhh Exp $ SPRITE (Berkeley)
  138. @
  139.  
  140.  
  141. 1.4
  142. log
  143. @don't use function prototypes if you are running lint.
  144. @
  145. text
  146. @d17 1
  147. a17 1
  148.  * $Header: /sprite/src/lib/include/RCS/cfuncproto.h,v 1.3 90/11/06 17:21:16 rab Exp $ SPRITE (Berkeley)
  149. d57 1
  150. a57 1
  151. #ifdef _HAS_PROTOTYPES && !defined(lint)
  152. @
  153.  
  154.  
  155. 1.3
  156. log
  157. @Changed extern to _EXTERN for g++.
  158. @
  159. text
  160. @d17 1
  161. a17 1
  162.  * $Header: /sprite/src/lib/include/RCS/cfuncproto.h,v 1.2 90/09/11 11:00:53 mendel Exp Locker: rab $ SPRITE (Berkeley)
  163. d57 1
  164. a57 1
  165. #ifdef _HAS_PROTOTYPES
  166. @
  167.  
  168.  
  169. 1.2
  170. log
  171. @Fixed stupid macro bug.
  172. @
  173. text
  174. @d17 1
  175. a17 1
  176.  * $Header: /sprite/lib/forms/RCS/proto.h,v 1.5 90/01/12 12:03:25 douglis Exp $ SPRITE (Berkeley)
  177. d29 1
  178. a29 1
  179.  *     char *argv[];
  180. d33 1
  181. a33 1
  182.  * extern int main _ARGS_((int argc, char *argv[]))
  183. d39 19
  184. a57 1
  185. #if defined(KERNEL) && defined(__STDC__) 
  186. d63 13
  187. @
  188.  
  189.  
  190. 1.1
  191. log
  192. @Initial revision
  193. @
  194. text
  195. @d40 1
  196. a40 1
  197. #define    _ARGS_(x)    (x)
  198. d42 1
  199. a42 1
  200. #define    _ARGS(x)    ()
  201. @
  202.